
package com.idealighter.game.gamehall.handler;

import com.google.inject.Inject;

import com.idealighter.game.core.annotation.ReqMsgHandler;
import com.idealighter.game.gamehall.manager.GameHallMgr;
import com.idealighter.game.gamehall.message.ReqModifyRoomSettingMsg;
import com.idealighter.game.message.ModuleMsgIdConstant;
import com.idealighter.game.message.core.ReqMessage;
import com.idealighter.game.message.core.ResMessage;
import com.idealighter.game.player.struct.Player;
import com.idealighter.game.server.handler.ReqMessageHandler;


@ReqMsgHandler(ModuleMsgIdConstant.GameCommon.MODIFY_ROOM_SETTINGS)
public class ReqModifyRoomSettingHandler implements ReqMessageHandler {

  @Inject
  private GameHallMgr gameHallMgr;

  @Override
  public ResMessage action(Player player, ReqMessage message) {
    ReqModifyRoomSettingMsg msg = (ReqModifyRoomSettingMsg) message;
    gameHallMgr.modifyRoomSetting(player, msg.getRoomSetting());

    return null;
  }
}
